﻿// ===============================================================================
//  Copyright © ymind.net. All rights reserved .
//  官方网站：http://ymind.net/
//  版权所有：彦铭工作室 老陈出品
// ===============================================================================

using System;
using Lcsoft.RssEngine.Shared;

namespace Lcsoft.RssEngine.RssChannel
{
	/// <summary>Allow processes to register with a cloud to be notified of updates to the channel.</summary>
	[Serializable]
	public class RssCloud : IRssElement
	{
		private string _domain = String.Empty;
		private string _path = String.Empty;
		private int _port = RssDefault.IntValue;
		private string _registerProcedure = String.Empty;

		/// <summary>
		/// 
		/// </summary>
		public RssCloud() { this.Protocol = RssCloudProtocol.Empty; }

		/// <summary>Domain name or IP address of the cloud</summary>
		public string Domain
		{
			get { return this._domain; }
			set { this._domain = RssDefault.Check(value); }
		}

		/// <summary>TCP port that the cloud is running on</summary>
		public int Port
		{
			get { return this._port; }
			set { this._port = RssDefault.Check(value); }
		}

		/// <summary>Location of its responder</summary>
		public string Path
		{
			get { return this._path; }
			set { this._path = RssDefault.Check(value); }
		}

		/// <summary>Name of the procedure to call to request notification</summary>
		public string RegisterProcedure
		{
			get { return this._registerProcedure; }
			set { this._registerProcedure = RssDefault.Check(value); }
		}

		/// <summary>Protocol used</summary>
		public RssCloudProtocol Protocol { get; set; }
	}
}
